<?php

/**
 * Site form.
 *
 * @package    sf_sandbox
 * @subpackage form
 * @author     Your name here
 * @version    SVN: $Id: sfPropelFormTemplate.php 10377 2008-07-21 07:10:32Z dwhittle $
 */
class UploadImageForm extends sfForm {
	public function configure() {
		
		$this->setWidgets ( array ('file' => new sfWidgetFormInputFile ( ) ) );
		
		$this->setValidators ( array ('file' => new sfValidatorFile ( 
		array('required' => true,'max_size' => 512000,'mime_types' => 'web_images',),
		array('required'=>'не выбран файл ','max_size'=>'большой файл','mime_types'=>'неверный тип файла')
		) ) );
		
		$this->widgetSchema->setLabels ( array ('file' => 'Файл' ) );
		
		//$this->validatorSchema->setPostValidator ( new sfGuardValidatorUser ( ) );
		
		$this->widgetSchema->setNameFormat ( 'upload[%s]' );
		
		$this->widgetSchema->setFormFormatterName('list');  
	
	}
}
